<?php
/*
 * @Author: sunkaiyuan sunkaiyuan@namenode.com
 * @Date: 2022-10-05 23:16:26
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @LastEditTime: 2023-08-28 13:15:20
 * @Description: 
 */

namespace App\Listeners;

use App\Events\ExampleEvent;
use App\Events\UploadFileEvent;
use App\Models\User;
use GatewayClient\Gateway as GatewayClientGateway;
use GatewayWorker\Lib\Gateway;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Log;



class UploadFileListener implements ShouldQueue
    {
    use InteractsWithQueue;


    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
        {
        }
    public function shouldQueue()
        {
        return true;
        }
    public function handle($event)
        {
        app()->instance("token", $event->token);
        wsSend("UploadFileEvent", ['data' => $event->data, 'success' => true]);
        }
    }
